package com.example.common.domain.Messages;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.time.LocalTime;

@Data
@NoArgsConstructor // 必须添加无参构造函数
public class Mgs  implements Serializable{
    private static final long serialVersionUID = 2L;
    private String type;
    private Object data;
    private String sender;   //发送者
    private String receiver;  //接收者
    private LocalDateTime create; //创建时间

    public Mgs(String type, Object data, String sender, String receiver, LocalDateTime create) {
        this.type = type;
        this.data = data;
        this.sender = sender;
        this.receiver = receiver;
        this.create = create;
    }

    public Mgs(String type, Object data, String sender, String receiver) {
        this.type = type;
        this.data = data;
        this.sender = sender;
        this.receiver = receiver;
    }

    public Mgs(String type, Object data, String sender) {
        this.type = type;
        this.data = data;
        this.sender = sender;
    }

    public Mgs(String type, Object data,LocalDateTime create) {
        this.type = type;
        this.data = data;
        this.create = create;
    }

    public Mgs(String type, Object data) {
        this.type = type;
        this.data = data;
    }


}
